<template>
	<view>
		<view class="payType"
			v-for="(item,index) in payTypeList"
			:key="index"
			@tap="selPayType(index,item.id)"
		>
			<view class="leftPayType">
				<view class="iconfont" :class="item.icon"></view>
				<view>
					{{item.name}}
				</view>
			</view>
			<view class="sel"
				:class="[payTypeIndex == index ? 'active' : '']"
			>
				<view class="iconfont icon-duihao"></view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props:{
			payTypeList:Array,
			payTypeIndex:Number
		},
		methods:{
			selPayType(index,id){
				this.$emit('selPayType',index,id)
			}
		}
	}
</script>

<style lang="scss" scoped>
	@import '@/static/scss/selPayType.scss';
</style>